// ======================
// 间距系统 (Spacing System)
// 基于4/8px基准的间距规范
// ======================

$spacing-base-unit: 4px !default;

// 基础间距谱系
$spacing-scale: (
  "0": 0,
  "1": $spacing-base-unit * 1, // 4px
  "2": $spacing-base-unit * 2, // 8px
  "3": $spacing-base-unit * 4, // 16px
  "4": $spacing-base-unit * 6, // 24px
  "5": $spacing-base-unit * 8, // 32px
  "6": $spacing-base-unit * 12, // 48px
  "7": $spacing-base-unit * 16  // 64px
);

// 快捷别名（电商专用场景）
$product-card-padding: map-get($spacing-scale, "3"); // 商品卡片内边距
$section-padding-y: map-get($spacing-scale, "5"); // 模块垂直间距

// 动态获取间距方法
@function spacing($level) {
  @return map-get($spacing-scale, $level);
}